#ifndef _AC_PRINTTHREAD
#define _AC_PRINTTHREAD

namespace AirCrash {
namespace Calypso {

namespace PrintType {
	enum Enum { Codes, Items, List };
}

class PrintThread : public QThread {
	Q_OBJECT

	PrintType::Enum mPrintType;
	QPrinter * mPrinter;
	QSqlQuery mQuery;
	QRect mPageMargins;
	QSize mRectSize;
	int mNumColls, mNumRows, mX, mY;

	void printCodes(QString day, QPainter& painter);
	void printItems(QPainter& painter);

public:
	PrintThread();
	~PrintThread();

	void run();
	void setPrinter(QPrinter * printer);
	void setPrintType(PrintType::Enum type);
};

}
}

#endif